﻿@model RegisterViewModel

@{
    ViewData["Title"] = "Register New User";
}

<div class="row">
    <div class="col-md-6 offset-md-3">
        <div class="card">
            <div class="card-header">
                <h3 class="card-title">Register New User</h3>
                <div class="card-tools">
                    <small class="text-muted">Admin Function</small>
                </div>
            </div>
            <div class="card-body">
                <form asp-action="Register">
                    <div asp-validation-summary="ModelOnly" class="text-danger"></div>

                    <div class="form-group">
                        <label asp-for="UserName" class="control-label"></label>
                        <input asp-for="UserName" class="form-control" />
                        <span asp-validation-for="UserName" class="text-danger"></span>
                    </div>

                    <div class="form-group">
                        <label asp-for="Password" class="control-label"></label>
                        <input asp-for="Password" class="form-control" />
                        <span asp-validation-for="Password" class="text-danger"></span>
                    </div>

                    <div class="form-group">
                        <label asp-for="ConfirmPassword" class="control-label"></label>
                        <input asp-for="ConfirmPassword" class="form-control" />
                        <span asp-validation-for="ConfirmPassword" class="text-danger"></span>
                    </div>

                    <div class="form-group form-check">
                        <input asp-for="IsAdmin" class="form-check-input" />
                        <label asp-for="IsAdmin" class="form-check-label">Is Administrator</label>
                    </div>

                    <div class="form-group">
                        <input type="submit" value="Create User" class="btn btn-primary" />
                        <a asp-action="UserList" class="btn btn-secondary">Back to User List</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

@section Scripts {
    @{
        await Html.RenderPartialAsync("_ValidationScriptsPartial");
    }
}